<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>用户管理</title>
  <style>
    body, html {
      background: #EEEEEE;
    }

    .content {
      width: calc(100% - 240px);
      height: calc(100% - 150px);
      float: right;
      padding: 20px;
    }

    .table-card {
      padding: 10px;
    }

    .top {
      width: calc(100% - 200px);
      height: 50px;
      background: white;
      margin-left: 200px;
      line-height: 50px;
    }
  </style>
</head>
<body>
<%--布局--%>
<jsp:include page="template/layout.jsp"/>
<%--内容--%>
<div class="top">
  <span class="layui-breadcrumb breadcrumb"><a id="breadcrumbTitle">用户管理</a></span>
</div>
<div class="content">
  <div class="layui-panel table-card">
    <a class="layui-btn" href="category_add.jsp">新增</a>
    <table class="layui-table lay-skin='nob' ">
      <colgroup>
        <col width="150">
        <col width="200">
        <col>
      </colgroup>
      <thead>
      <tr>
        <th>分类名称</th>
        <th>描述</th>
        <th>备注</th>
        <th>创建时间</th>
      </tr>
      </thead>
      <tbody>
      <jsp:useBean id="list" scope="request" type="java.util.List"/>
      <c:forEach var="category" items="${list}">
        <tr>
          <td>${category.name}</td>
          <td>${category.desciption}</td>
          <td>${category.mark}</td>
          <td>${category.createdTime}</td>
          <td>
            <a type="button" class="layui-btn layui-btn-normal layui-btn-sm"
               href="doUserEdit?username=${category.name}"
            >
              <i class="layui-icon">&#xe642;</i>
            </a>
            <a type="button" class="layui-btn layui-btn-danger layui-btn-sm"
               href="doUserDelete?id=${category.id}">
              <i class="layui-icon">&#xe640;</i>
            </a>
          </td>
        </tr>
      </c:forEach>
      </tbody>
    </table>
  </div>
</div>
</body>
</html>

